package br.com.cefetrn.apoena.dominio.home;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Session;

public interface IxHomeGeneric <G, ID extends Serializable> {
	
		final Log log = LogFactory.getLog(IxHomeGeneric.class);

		@SuppressWarnings("unchecked")
		public abstract G findById(ID id);

		@SuppressWarnings("unchecked")
		public abstract List<G> findAll();

		@SuppressWarnings("unchecked")
		public abstract List<G> findByExample(G instance);

		@SuppressWarnings("unchecked")
		public abstract List<G> findByExample(G exampleInstance,
				String[] excludeProperty);

		@SuppressWarnings("unchecked")
		public abstract G persist(G instance);

		public abstract G attachDirty(G instance);

		public abstract G attachClean(G instance);

		@SuppressWarnings("unchecked")
		public abstract G merge(G detachedInstance);

		public abstract G delete(G persistentInstance);
	    
		public abstract void flush();

		public abstract void clear();
		
		public abstract void setSession(Session session);
	    
}
